package com.chen.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
@ApiModel(description = "商品")
@TableName("item")
@Data
public class Item {
    //  将数据库的字段和这个属性绑定,idType=AUTO设置主键自增
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("商品标题")
    private String title;

    @ApiModelProperty("商品卖点")
    private String sellPoint;

    @ApiModelProperty("商品价格")
    private BigDecimal price;

    @ApiModelProperty("库存数量")
    private Integer stock;

    @ApiModelProperty("商品条形码")
    private String barcode;

    @ApiModelProperty("商品图片")
    private String image;

    @ApiModelProperty("所属类目")
    private Long cid;

    @ApiModelProperty("商品状态")
    private Byte status;

    @ApiModelProperty("创建时间")
    private Date created;

    @ApiModelProperty("更新时间")
    private Date updated;
}
